//
//  HSectionTitleView.swift
//  VastSwift
//
//  Created by BestVast on 2021/5/30.
//

import UIKit

/// 推荐商家、热卖精选 头部相同view
class HSectionTitleView: UIView {

    // 主标题
    var titleLabel: UILabel!
    /// 副标题
    var subTitleLabel: UILabel!
    func uiConfig() -> Void {
        self.backgroundColor = .white
        
        titleLabel = UILabel.init(frame: CGRect.init(x: (screenWidth - 120) / 2, y: 10, width: 120, height: 22))
        titleLabel.textColor = .black
        titleLabel.textAlignment = .center
        titleLabel.font = .systemFont(ofSize: 18)
        self.addSubview(titleLabel)
        
        subTitleLabel = UILabel.init(frame: CGRect.init(x: (screenWidth - 160) / 2, y: titleLabel.bottom + 10, width: 160, height: 22))
        subTitleLabel.textColor = .white
        subTitleLabel.textAlignment = .center
        subTitleLabel.backgroundColor = colorTheme
        subTitleLabel.font = .systemFont(ofSize: 12)
        self.addSubview(subTitleLabel)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.uiConfig()
    }
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }

}
